<script lang="ts" setup>
const { collapse } = defineProps({
  collapse: {
    type: Boolean,
    default: false
  }
})

const emit = defineEmits<{ (e: "toggleCollapse"): void }>()
const handleClick = () => {
  emit("toggleCollapse")
}
</script>

<template>
  <div class="hamburger-container">
    <svg-icon
      :class="{ 'rotate-180': collapse }"
      custom-class="hamburger"
      icon-name="ant-design:menu-unfold-outlined"
      @click="handleClick"
    ></svg-icon>
  </div>
</template>

<style lang="scss" scoped>
.hamburger-container {
  @apply leading-[50px] float-left cursor-pointer px-10px hover:[bg-black/5];
}

.hamburger {
  @apply w-[30px] h-[30px] transition-transform duration-300;
}
</style>
